package com.hudson.plugin.internal.domain.entity;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Created by IntelliJ IDEA.
 * User: Richard
 * Date: 4/26/11
 * Time: 11:58 PM
 * To change this template use File | Settings | File Templates.
 */
@Entity
public class Ccheckresult {
    private int id;

    @javax.persistence.Column(name = "id")
    @Id
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    private int buildid;

    @javax.persistence.Column(name = "buildId")
    @Basic
    public int getBuildid() {
        return buildid;
    }

    public void setBuildid(int buildid) {
        this.buildid = buildid;
    }

    private String score;

    @javax.persistence.Column(name = "score")
    @Basic
    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    private String summary;

    @javax.persistence.Column(name = "summary")
    @Basic
    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    private String resultreason;

    @javax.persistence.Column(name = "resultReason")
    @Basic
    public String getResultreason() {
        return resultreason;
    }

    public void setResultreason(String resultreason) {
        this.resultreason = resultreason;
    }

    private String details;

    @javax.persistence.Column(name = "details")
    @Basic
    public String getDetails() {
        return details;
    }

    public void setDetails(String details) {
        this.details = details;
    }

    private String displayname;

    @javax.persistence.Column(name = "displayName")
    @Basic
    public String getDisplayname() {
        return displayname;
    }

    public void setDisplayname(String displayname) {
        this.displayname = displayname;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Ccheckresult that = (Ccheckresult) o;

        if (buildid != that.buildid) return false;
        if (id != that.id) return false;
        if (details != null ? !details.equals(that.details) : that.details != null) return false;
        if (displayname != null ? !displayname.equals(that.displayname) : that.displayname != null) return false;
        if (resultreason != null ? !resultreason.equals(that.resultreason) : that.resultreason != null) return false;
        if (score != null ? !score.equals(that.score) : that.score != null) return false;
        if (summary != null ? !summary.equals(that.summary) : that.summary != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + buildid;
        result = 31 * result + (score != null ? score.hashCode() : 0);
        result = 31 * result + (summary != null ? summary.hashCode() : 0);
        result = 31 * result + (resultreason != null ? resultreason.hashCode() : 0);
        result = 31 * result + (details != null ? details.hashCode() : 0);
        result = 31 * result + (displayname != null ? displayname.hashCode() : 0);
        return result;
    }
}
